package emulator.hardware.io.peripherals.iec.sim;

public class StateMachine
{
	private Edge  _initialEdge;
	private MachineState _currentState;
	
	public StateMachine(Edge initialEdge)
	{
		_initialEdge = initialEdge;
//		reset();
	}
	
	public void reset()
	{
		_currentState = _initialEdge.execute();
	}
	
	public void tick() throws Exception
	{
		_currentState = _currentState.next();
	}
}
